package com.sansui.blog.controller.admin.api;

import com.alibaba.fastjson.JSON;
import com.sansui.blog.pojo.User;
import com.sansui.blog.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @name: InitJsonController
 * @author: Sansui
 * @Software: IDEA
 * @Blog: https://www.cnblogs.com/sansui6/
 * @date: 2022-03-20 12:19
 **/


/* 后台的 加载列表 控制器 */
@Controller
@RequestMapping("/admin")
public class SysMenuInitController {

    @Autowired
    private SysMenuService sysMenuService;

    /*
    * 后台菜单初始化
    * 返回json
    * */
    @GetMapping("/api/init")
    @ResponseBody
    public Map<String, Object> getInit(){
        Map<String, Object> map = sysMenuService.menuInit();
        return map;
    }

}
